<?php
    $modelR = new RemoveCircumflex();
    $modelPT = new ParentTypeModel();
    $link = $this->link;
    $url = $this->url;
    
    //Trang xem
    if(isset($link['id'])):
    if(isset($this->film)) $film = $this->film;
    
    $index_type = explode('|',$film[0]['type']);
    $parent_type = $modelPT->getTypeById($index_type[0]);
    $type = explode('|',$film[0]['name_types']);
    for($i = 0;$i < count($type); $i++){
            $type[$i] = explode('-',$type[$i]);
    };
?>
<div id="video">
    <h2 class="video-title"><?php echo $film[0]['title_vi']?></h2>
    <p class="video-info">
        Thể loại:<?php for($i=1;$i<count($index_type);$i++){?>
         <?php if($i != 1){?>
         ,
         <?php }?>
         <?php for($j = 0;$j < count($type);$j++){if($type[$j][0] == $index_type[$i]){?>
         <a href="/<?php echo $modelR->rewrite($parent_type[0]['name']);?>/category/1-<?php echo $index_type[0];?>-<?php echo $type[$j][0]?>-<?php echo $modelR->rewrite($type[$j][1]); ?>.html"><?php echo $type[$j][1];};?></a>
         <?php }?>
         <?php }?>
        | Lượt xem: <?php echo $film[0]['hits']?>
        <?php if($film[0]['source'] != null && $film[0]['source'] != "") echo "| Nguồn: ".$film[0]['source']?>
    </p>
     <?php if($film[0]['type_data_ep'] == 0){?>
     <!--
     <script language="JavaScript">
        $(document).ready(function(){
            function autoResize(){
                var id = 'player';
                var newheight;
                var newwidth;
            
                if(document.getElementById){
                    newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
                    newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
                }
            
                document.getElementById(id).height= (newheight) + "px";
                document.getElementById(id).width= (newwidth) + "px";
            }
        })
    </script>
    -->
    <script language="javascript">
			$(document).ready(function(){
				var width = $(window).width()*0.9;
				var height = width*0.6;
				var width_max = 640;
				var height_max = 360;
				if(width > width_max){
					$('#player').css('width', width_max);
					$('#player').css('height', height_max);
				}else{
					$('#player').css('width', width);
					$('#player').css('height', height);
				}
				
				$(window).resize(function() {
					width = $(window).width()*0.9;
					height = width*0.6;
					if(width > width_max){
					$('#player').css('width', width_max);
					$('#player').css('height', height_max);
					}else{
						$('#player').css('width', width);
						$('#player').css('height', height);
					}
				})
			})
    </script>
    <div class="container_player"><center><div class="vendor"><div id="player"></div></div></center></div>
	<script>
    var hash = window.location.hash;//Lay thong so #ep
    if(hash != ''){
            hash = hash.split('#ep');
            hash = hash[1].split('-');
            hash = hash[0];
    }else hash = 1;
    
	var tag = document.createElement('script');
    tag.src = "//www.youtube.com/iframe_api";
    var firstScriptTag = document.getElementsByTagName('script')[0];
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
	var player;
	var playlist = [<?php echo $film[0]['id_eps'];?>];
	function onYouTubePlayerAPIReady() {
		 player = new YT.Player('player', {
		  //location: 'MOBILE',
          //height: '390',
          //width: '100%',
          playerVars: {
            'autoplay': 0,
            'controls': 1,
          },
          events: {
            'onReady': onPlayerReady,
            'onStateChange': onPlayerStateChange,
            //'onPlaybackQualityChange': testfunc(),
          }
        });
	}
	function onPlayerReady(event) { 
		event.target.cuePlaylist(playlist,hash-1); 
	}
      //var done = false;
    var flag_start = 0;
    var flag_play  = 0;
    var text = "";
    var tap = hash-2;
    var href = window.location.href;
    tmp_href = href.split('#ep');
    //if(tmp_href[1] == null) tmp_href = href.split('.html');
    href = tmp_href[0];
    function onPlayerStateChange(event) {
        if(event.data == -1) flag_start = 1;
        if(event.data == 1) flag_play = 1;
        
        if(flag_start == 1 && flag_play == 1){
            tap++;
            text = $('#ep-'+tap).text();//lay tieu de cua tap phim
            text = locdau(text);//o dau tieu de

            $('.episode').removeClass('playing');
            $('.ep-'+tap).addClass('playing');
            window.location.replace(href+'#ep'+tap+'-'+text);//day ep len url
            
            flag_start = 0;
            flag_play  = 0;
        }
    }
    function stopVideo() {
        player.stopVideo();
	}
    function playAt(ep){
        player.playVideoAt(ep);
        tap = ep;
    }
    function playNext()
    {
        var number_eps = $(".episode").length;
        hash = window.location.hash;//Lay thong so #ep
        hash = hash.split('#ep');
        hash = hash[1].split('-');
        hash = parseInt(hash[0]);
        hash = hash+1;
        if(hash > 0){
            player.playVideoAt(hash-1);
            tap = hash-1;        
        }else{
            alert("Không còn tập nào phía trước.");
        }
    }
    function playPrev()
    {
        hash = window.location.hash;//Lay thong so #ep
        hash = hash.split('#ep');
        hash = hash[1].split('-');
        hash = parseInt(hash[0]);
        hash = hash-1;
        if(hash > 0){
            player.playVideoAt(hash-1);
            tap = hash-1;        
        }else{
            alert("Không còn tập nào phía trước.");
        }
    }
    function locdau(str) {
      str= str.toLowerCase();
      str= str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a");
      str= str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e");
      str= str.replace(/ì|í|ị|ỉ|ĩ/g,"i");
      str= str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o");
      str= str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u");
      str= str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y");
      str= str.replace(/đ/g,"d");
      str= str.replace(/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g,"-");
        /* tìm và thay thế các kí tự đặc biệt trong chuỗi sang kí tự - */
      str= str.replace(/-+-/g,"-"); //thay thế 2- thành 1-
      str= str.replace(/^\-+|\-+$/g,"");
        //cắt bỏ ký tự - ở đầu và cuối chuỗi
      return str;
     } 
	</script>
	</div>
    <?php }else{?>
    <div id="cover_player_flash">
        <div id="player"></div>
    </div>
        <script>
            var text = "";
            var hash = window.location.hash;//Lay thong so #ep
            var url = window.location.pathname;
            var id  = <?php echo $link['id']?>;
            var strURL = "/index/hash";
            var href = window.location.toString();
            tmp_href = href.split('#ep');
            href = tmp_href[0];
            if(hash != ''){
                    hash = hash.split('#ep');
                    hash = hash[1].split('-');
                    hash = hash[0];
            }else{
                hash = 1;
            } 
            window.onload = function(){
               
                $.ajax({
        			url:strURL,
        			type:"POST",
        			data:{'hash':hash,'id' :id},
        			success:function(msg){	
            		      $("#player").html(msg);					
        			}
    			});
                
                $('.episode').removeClass('playing');
                $('.ep-'+hash).addClass('playing');
                
                text = $('#ep-'+hash).text();//lay tieu de cua tap phim
                text = locdau(text);//o dau tieu de
                window.location.replace(href+'#ep'+hash+'-'+text);//day ep len url   
            }
            
            function playAt(ep){
                $.ajax({
        			url:strURL,
        			type:"POST",
        			data:{'hash':ep+1,'id' :id},
        			success:function(msg){						
            		      $("#player").html(msg);					
        			}
    			});
                $('.episode').removeClass('playing');
                $('.ep-'+(ep+1)).addClass('playing');
            }
            function playPrev(){
                hash = window.location.hash;//Lay thong so #ep
                hash = hash.split('#ep');
                hash = hash[1].split('-');
                hash = parseInt(hash[0]);
                hash = hash-1;
                if(hash > 0){
                    $.ajax({
            			url:strURL,
            			type:"POST",
            			data:{'hash':hash,'id' :id},
            			success:function(msg){						
                		      $("#player").html(msg);					
            			}
        			});
                    text = $('#ep-'+hash).text();//lay tieu de cua tap phim
                    text = locdau(text);//o dau tieu de
                    
                    $('.episode').removeClass('playing');
                    $('.ep-'+hash).addClass('playing');
                    window.location.replace(href+'#ep'+hash+'-'+text);//day ep len url
                }else{
                    alert("Không còn tập nào phía trước.");
                }
            }
            function playNext(){
                var number_eps = $(".episode").length;
                hash = window.location.hash;//Lay thong so #ep
                hash = hash.split('#ep');
                hash = hash[1].split('-');
                hash = parseInt(hash[0]);
                hash = hash+1;
                if(hash <= number_eps){
                    $.ajax({
            			url:strURL,
            			type:"POST",
            			data:{'hash':hash,'id' :id},
            			success:function(msg){						
                		      $("#player").html(msg);					
            			}
        			});
                    text = $('#ep-'+hash).text();//lay tieu de cua tap phim
                    
                    text = locdau(text);//o dau tieu de
                    
                    $('.episode').removeClass('playing');
                    $('.ep-'+hash).addClass('playing');
                    window.location.replace(href+'#ep'+hash+'-'+text);//day ep len url
                }else{
                    alert("Không còn tập nào phía sau.");
                }
            }
            
            function locdau(str) {
              str= str.toLowerCase();
              str= str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a");
              str= str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e");
              str= str.replace(/ì|í|ị|ỉ|ĩ/g,"i");
              str= str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o");
              str= str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u");
              str= str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y");
              str= str.replace(/đ/g,"d");
              str= str.replace(/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g,"-");
                /* tìm và thay thế các kí tự đặc biệt trong chuỗi sang kí tự - */
              str= str.replace(/-+-/g,"-"); //thay thế 2- thành 1-
              str= str.replace(/^\-+|\-+$/g,"");
                //cắt bỏ ký tự - ở đầu và cuối chuỗi
              return str;
             } 
        </script>
    <?php }?>
    <div id="btn-tools">
        <div id="btn-controls">
            <a class="btn-control prev-btn" title="Tập trước" onclick="playPrev()">&nbsp;</a>
            <a class="btn-control next-btn" title="Tập tiếp" onclick="playNext()">&nbsp;</a>
        </div>
		
		
        <div id="fb-root" style="float: right;display: none"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <div style="float: right;width: 135px; display: block;overflow: hidden;-webkit-overflow-scrolling: touch;"class="fb-like" data-href="<?php echo $url?>" data-send="true" data-layout="button_count" data-width="125" data-show-faces="true" data-font="tahoma"></div>
        <div style="float: right;">
        <div class="clear"></div>
            <g:plusone size='medium'></g:plusone>
        
            <script type="text/javascript">
                window.___gcfg = {
                    lang: 'en-US'
                };
        
              (function() {
                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                po.src = 'https://apis.google.com/js/plusone.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
              })();
            </script>
        </div>
        <div class="clear"></div>
		
    </div>
	<!--quang cao-->
	<div style="margin:12px 0 10px 10px; text-align:center; ">
   <center><div id="sunnet_widget_44" style="display: none;"></div>
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
        
	</div>
	
    <div id="list-eps" style="clear: both;margin-top:55px;">
        <ul>
        <?php
            $name_eps = stripslashes($film[0]['des_eps']);
            if($name_eps != "#|#" && $name_eps != ""){
                $name_eps  = explode('#|#',$name_eps);
                for($i = 0;$i<count($name_eps);$i++){
                    echo "<li class='episode ep-".($i+1)."'><span>".($i+1)."</span><a id='ep-".($i+1)."' href='#ep".($i+1)."-".$modelR->rewrite($name_eps[$i])."' onclick='playAt(".$i.")'>".$name_eps[$i]."</a><div class='clear'></div></li>";
                }
            }else{
                $id_eps = stripslashes($film[0]['id_eps']);
                $id_eps = explode(',',$id_eps);
                for($i = 0;$i<count($id_eps);$i++){
                    echo "<li class='episode ep-".($i+1)."'><span>".($i+1)."</span><a id='ep-".($i+1)."' href='#ep".($i+1)."-tap".($i+1)."' onclick='playAt(".$i.")'>Tập ".($i+1)."</a><div class='clear'></div></li>";
                }
            }
         ?>
         </ul>
    </div>
    <div class="content-block box-info">
        <h2 class="label_top">Thông tin</h2>
        <div class="box-info-block">
           <head> <a><img property="og:image:secure_url" src="<?php echo $film[0]['thumb']?>"  rel="image_src" alt ="<?php echo $film[0]['title_vi']?>"/></a></head>
            <span>
                <div class="row2" expand="row2" id="_info"><?php echo $film[0]['description']?></div>
                <p><a class="read-all _viewMore" rel="#_info">Xem toàn bộ</a></p>
                <script>
                    $(document).ready(function(){
                        var dem = 0;
                        $('._viewMore').click(function() {
                            var h = $(document).scrollTop();
                            dem++;
                            if(dem%2==1){
                                $('#_info').height('auto');
                                $("._viewMore").addClass('hide');
                                $("._viewMore").text('Rút gọn');
                            }else{
                                $('#_info').height('150');
                                $("._viewMore").removeClass('hide');
                                $("._viewMore").text('Xem toàn bộ');
                            }
                            $(document).scrollTop(h);
                        });
                    });
                </script>
            </span>
            <div class="clear"></div>
        </div>
    </div>
	
    <div class="content-block box-comment">
        <h2 class="label_top">Bình luận</h2>
        <!--
        <div id="_commentNotiBox">
            <p class="notification attention">Chỉ chấp nhận bình luận bằng tiếng Việt có dấu, những bình luận sai quy định sẽ bị xóa</p>
        </div>
        -->
        
        <div class="comment-form">
            <div id="fb-root"></div>
            <script>(function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
              fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));</script>
            <div class="fb-comments" data-href="<?php echo $url;?>" data-num-posts="10"></div>
        </div>
    
    </div>
<?php
    //Trang thu muc cha
    elseif(isset($link['cate']) && !isset($link['type'])):
        $listFilm = $this->listFilm;
        $category1 = $listFilm[0]['type'];
        $category1 = explode('|',$category1);
        $category1 = $category1[0];
        $name_cate = explode('.html',$_SERVER['REQUEST_URI']);
        $name_cate = $name_cate[0];
        $name_cate = explode('-',$name_cate,3);
        $name_cate = $name_cate[2];
    
        $name = $listFilm[0]['name_types'];
        $name = explode('|',$name);
        for($i = 0;$i < count($name); $i++){
                $name[$i] = explode('-',$name[$i]);
        };
        $num_type = count($name);
        for($i=0; $i< $num_type; $i++):
 ?>
 <div>
 <!--quang cao-->

 <div id="sunnet_widget_44" style="display: block;padding:5px;">
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
        
</div>
	
	
 </div>
    <div class="box_top box_type" style="clear: both; ">
            <h2 class="label_top"><?php echo $name[$i][1]?> mới nhất</h2>
            <ul class="list_video">
            <?php if($this->listFilm != '' && $this->listFilm  != null){
                $dem = 0;
                foreach($this->listFilm  as $item){
                if($dem == 6) break;
                $type = explode('|',$item['type']);
                $flag = true;
                for($m = 1; $m < count($type); $m++){
                    if($type[$m] == $name[$i][0] && $type[$m] != ''){
                        $flag = true;
                        break;
                    }else $flag = false;
                };
                if($flag == true){
            ?>
            <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['id']?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
                <img src="<?php echo $item['thumb']?>"/>
                <span>
                    <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                    <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
                </span>
                <div class="clear"></div>
            </a>
            </li>
            <?php $dem++;}}}?>     
        </ul>
        <a class='read_more' href="/<?php echo $name_cate?>/category/1-<?php echo $category1?>-<?php echo $name[$i][0]?>-<?php echo $modelR->rewrite($name[$i][1])?>.html">Xem tiếp &raquo;</a>
    </div>
 <?php 
        endfor;
    //Trang the loai con
    elseif(isset($link['cate']) && isset($link['type'])):
 ?>
 
 <!--quang cao-->
	
   <center><div id="sunnet_widget_44" style="display: none;padding:10px;">
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
      
	</div></center>
	
	<!--end quang cao-->
 <div class="box_top" style="clear:both;">
 <h2 class="label_top"><?php echo $this->label_top;?></h2>
 <ul class="list_video">
         <?php $paginationControl = $this->paginationControl($this->paginator, 'Sliding', '/index/paginator.phtml') ?>
         <?php if (count($this->paginator)) : ?>
         <?php
                $dem = 1;
                foreach($this->paginator  as $item){
                $type = explode('|',$item['type']);
                $name_types = explode('|',$item['name_types']);
                for($i = 0;$i < count($name_types); $i++){
                        $name_types[$i] = explode('-',$name_types[$i]);
                };
            ?>
            <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['id']?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
            <img src="<?php echo $item['thumb']?>"/>
            <span>
                <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
            </span>
            <div class="clear"></div>
            </a></li>
            <?php $dem++;}?>   
            <?php endif;?>      
        </ul>
 </div>
 <div class="pagi-control" >
 <?php echo $paginationControl; ?>
 </div>
 <?php 
    //Trang chu
    else:
 ?>
 
 
 <!--quang cao-->

   <center><div id="sunnet_widget_44" style="display: none; padding:5px;">
    
    <script type="text/javascript">var is_load_sunnet_lib = is_load_sunnet_lib || 1;if(is_load_sunnet_lib == 1) {is_load_sunnet_lib = 2;if(typeof(jQuery)=='undefined') {document.write(unescape("%3Cscript src='http://amobi.vn/js/default/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));}document.write(unescape("%3Cscript src='http://amobi.vn/js/default/sunnet.js' type='text/javascript'%3E%3C/script%3E"));}</script>
    <script type="text/javascript" src="http://amobi.vn/index/widget?widget_id=44"></script>    </center>    
      
	</div></center>

	<!--end quang cao-->
 <div class="box_top top_new" style="clear:both;">
    <h2 class="label_top">Top Video Mới Nhất</h2>
    <ul class="list_video">
        <?php
            foreach($this->newvideo as $item):
         ?>
         <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['id']?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
            <img src="<?php echo $item['thumb']?>"/>
            <span>
                <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
            </span>
            <div class="clear"></div>
         </a></li>
         <?php
            endforeach;
          ?>
    </ul>
 </div>
 
 <div class="box_top top_view">
 <h2 class="label_top">Top Video Xem Nhiều Nhất</h2>
 <ul class="list_video">
        <?php
            foreach($this->topvideo as $item):
         ?>
         <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['film_id'];?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
            <img src="<?php echo $item['thumb']?>"/>
            <span>
                <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
            </span>
            <div class="clear"></div>
         </a></li>
         <?php
            endforeach;
          ?>
    </ul>
 </div>
 
 <div class="box_top top_nomination">
 <h2 class="label_top">Top Video Đề Cử Từ BQT</h2>
 <ul class="list_video">
        <?php
            foreach($this->nominationvideo as $item):
         ?>
         <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['id']?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
            <img src="<?php echo $item['thumb']?>"/>
            <span>
                <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
            </span>
            <div class="clear"></div>
         </a></li>
         <?php
            endforeach;
          ?>
    </ul>
 </div>
 
 <?php 
    //Trang chu
    endif;
 ?>